﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WomanMotion.WebApi.Model.Dtos.Contents;

namespace WomanMotion.WebApi.Model.Dtos.Comment
{
    /// <summary>
    /// 评论VM
    /// </summary>
    public class CommentVM : BaseVM
    {
        /// <summary>
        /// 文章ID
        /// </summary>
        public long Contentsid { get; set; }

        /// <summary>
        ///文章对象
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(Contentsid))]
        public ContentsVM? Contents { get; set; } //不能赋值只能是null

        /// <summary>
        /// 上级评论ID
        /// </summary>
        public long Parentid { get; set; }

        /// <summary>
        /// 评论内容
        /// </summary>
        public string? Content { get; set; }
    }
}